%--------------------------------------------------------------------------
% Calculate flow utility function
%--------------------------------------------------------------------------

function [utility] = CalcUtility(y,m)

global rra;

utility = ((y-m).^(1-rra)-1)/(1-rra); 
utility(y<=m)=-999; 

%--------------------------------------------------------------------------
% end of program
%--------------------------------------------------------------------------
